home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2541 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: ifi.uio.no!usenet
  2. From: ludvigp@ifi.uio.no (Ludvig Pedersen)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: PPC compilers
  5. Date: 1 Feb 1996 19:38:03 GMT
  6. Organization: Dept. of Informatics, University of Oslo, Norway
  7. Message-ID: <1316.6605T735T2597@ifi.uio.no>
  8. References: <38232191@kone.fipnet.fi> <551.6602T1231T2646@ifi.uio.no> <38232238@kone.fipnet.fi>
  9. NNTP-Posting-Host: gymir.ifi.uio.no
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12. >> Sorry, I have not followed this discusion closely.
  13. >> What problems will it cause to have 2 addx? Is there anything wrong with
  14. >> just exchanging the fraction parts like we are doing today?
  15. >For a normal loop with one addx you set the x-flag correctly like
  16. >this:
  17. >        moveq   #0,d0
  18. >        add.l   d1,d0
  19. >        ...
  20. >.loop   addx.l  d1,d2
  21. >        dbf     d7,.loop
  22. >But, what we do if we have two addx (16.16 for V too) and still
  23. >want 100% accuracy.
  24. >You just cleared the x-flag before the loop, is that really
  25. >correct?
  26.  
  27. Well, I know on thing for sure, and that is:
  28.  
  29. >        moveq   #0,d0
  30. >        add.l   d1,d0
  31.  
  32. ...*ALLWAYS* sets the x-flag to 0 for any value d1!
  33.  
  34. So *YOU* allways clear the x-flag too. :))
  35.  
  36.  
  37.  
  38. BTW:
  39.  
  40. Now, I'm thinking about something that /can/ be wrong with the addx routines.
  41.  
  42. The X-flag is not added to d2 at the correct time, I think.
  43. Its delayed with 1 run throw the loop:
  44.  
  45. So here is a suggestion:
  46.  
  47.     sub.w  d1,d2           ; This routine will only affect the hi-word of
  48.     add.l  d1,d2           ; d2 and set the xflag right.
  49.  
  50. This routine will solve the the x-flag *and* the delay problem.
  51. (If you are using 16:16)
  52.  
  53. It looked cool, I think I will try that in my routines! :)
  54.  
  55.  
  56.  
  57. <sb>Ludde - Amiga Demo Coder
  58. <sb>Virtual Reality & Official Be developer
  59. <sb>ludvigp@ifi.uio.no
  60.  
  61.